//package com.milk.milkpush.mica;
//
//import lombok.RequiredArgsConstructor;
//import lombok.extern.slf4j.Slf4j;
//import net.dreamlu.iot.mqtt.core.server.MqttServer;
//import net.dreamlu.iot.mqtt.spring.server.MqttServerTemplate;
//import org.springframework.stereotype.Service;
//
//import java.nio.charset.StandardCharsets;
//
//@Slf4j
//@Service
//@RequiredArgsConstructor
//public class MicaMqttSender {
//    private final MqttServerTemplate server;
//
//    public boolean publish(String topic, String body) {
//        boolean result = server.publishAll(topic, body.getBytes(StandardCharsets.UTF_8));
//        log.info("Mqtt Send result:{}", result);
//        return result;
//    }
//}
